﻿using UnityEngine;
using System.Collections;

public class GameMain : SingletonMonoBehaviour<GameMain>
{

		public enum GameState
		{
				Title,
				InGame,
				GameOver,
		};

		public float Score{ get; set; }

		public GameState state{ get; set; }
		// Use this for initialization
		void Start ()
		{
				InitTitle ();
		}
	
		// Update is called once per frame
		void Update ()
		{
	
		}


		void SetState (GameState nextstate)
		{
				state = nextstate;
		}
		public void InitTitle ()
		{
				GUIManager.Instance.Open<TitlePanel> ();
	
				SetState (GameState.Title);
		
		
		}
		public void InitInGame ()
		{
			
				SetState (GameState.InGame);		
				GUIManager.Instance.Open<GamePanel> ();

		
		}

}
